<?php

require_once($config_rootdir."/php/dao/enemy/enemyDAO.php");

function enemyService_diceEnemyLevel($heroLevel) {
  $minLevel = $heroLevel > 2 ? $heroLevel - 2 : 1;
  $maxLevel = $heroLevel < 9 ? $heroLevel + 2 : 10;
  
  return rand($minLevel, $maxLevel);
}

function enemyService_findRandomByLevel($level) {
  return enemyDAO_findRandomByLevel($level);
}
